<html>
  <head>
    <script
      src="https://cdn.socket.io/4.3.2/socket.io.min.js"
      integrity="sha384-KAZ4DtjNhLChOB/hxXuKqhMLYvx3b5MlT55xPEiNmREKRzeEm+RVPlTnAn0ajQNs"
      crossorigin="anonymous"
    ></script>
    <script>
      const socket = io('http://localhost:3005');
      socket.on('connect', function () {
        console.log('Connected');

        socket.emit('findAllSocket', (response) =>
          console.log('findAllAaa', response),
        );

        socket.emit('findOneSocket', 1, (response) =>
          console.log('findOneAaa', response),
        );

        socket.emit('createSocket', { name: 'guang' }, (response) =>
          console.log('createAaa', response),
        );

        socket.emit('updateAaa', { id: 2, name: 'dong' }, (response) =>
          console.log('updateAaa', response),
        );

        socket.emit('removeAaa', 2, (response) =>
          console.log('removeAaa', response),
        );
      });
      socket.on('xf', function (msg) {
        console.log('on xf');
        console.log(msg);
      });
      socket.on('disconnect', function () {
        console.log('Disconnected');
      });
    </script>
  </head>

  <body></body>
</html>
